import { ref } from "vue";

const useCounter = (num) => {
  const count = ref(num);
  const fn = (n) => {
    count.value += n;
  };

  return [count, fn];
};

export default useCounter;
